package com.dlc.shop.bean.event;

import com.dlc.shop.bean.model.UserExtension;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.Collections;
import java.util.List;

/**
 *  用户升级的事件
 * @author lhd
 */
@Data
@AllArgsConstructor
public class LevelUpEvent {
    public LevelUpEvent(UserExtension userExtension, Integer level, Integer levelType, Long shopId, Integer isNeedScore) {
        this.userExtensions = Collections.singletonList(userExtension);
        this.level = level;
        this.levelType = levelType;
        this.shopId = shopId;
        this.isNeedScore = isNeedScore;
    }

    private List<UserExtension> userExtensions;
    private Integer level;
    private Integer levelType;
    private Long shopId;
    /**
     * 是否需要赠送注册积分 1是0否
     * 因为批量导入注册的时候已经赠送过，而手动注册没有
     */
    private Integer isNeedScore;
}
